package org.emaait.app.dao;

import java.sql.SQLException;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class BaseDao extends SqlMapClientDaoSupport{
	public <T> Object save(String sql, T t) throws SQLException{
		return this.getSqlMapClient().insert(sql, t);
	}
	
	public <T> int delete(String sql, T t) throws SQLException{
		return this.getSqlMapClient().delete(sql, t);
	}
	
	public <T> int update(String sql, T t) throws SQLException{
		return this.getSqlMapClient().update(sql, t);
	}
	
	public <T> List<?> select(String sql, T t) throws SQLException{
		return this.getSqlMapClient().queryForList(sql, t);
		
	}
	
}
